This invention relates to a switch interface and, more particularly, to an electronic circuit capable of determining if a two-position switch is opened, closed or faulty to some extent.
Two-position (i.e., "ON/OFF", "OPENED/CLOSED") mechanical switches are used in countless electronic and electrical circuits for various applications. For example, the switches may be manually or automatically moveable or controlled, and their status indicative of certain desired or actual conditions within a system, such as an aircraft flight control.
A simple electrical connection for a two-position switch is to have one terminal of the switch connected to electrical ground, and a second terminal connected to one side of a pull-up resistor, the other side of the resistor connected to a voltage source, such as +5 VDC. The voltage at the second terminal is indicative of the switch position. That is, when the switch is closed, current flows through the pull-up resistor and the entire value of the voltage source is dropped across the resistor. Thus, zero volts DC (i.e., electrical ground) is on the second terminal of the switch. On the other hand, when the switch is opened, no current flows through the pull-up resistor, and, thus, no voltage is dropped thereacross. Therefore, the entire value of the voltage source (e.g., +5 VDC) is on the second terminal of the switch.
Corresponding simple circuitry for "reading" or sensing the status of the switch (i.e., either opened or closed) by sensing the voltage value on the second terminal may comprise a comparator or operational amplifier having two inputs. A first input is connected to a fixed or varying reference voltage value, while a second input is connected to the second terminal on the switch. The output signal of the comparator will assume one of two states, depending on whether the second terminal switch voltage is greater than or less than the reference voltage.
However, a switch may, over time, become corroded or contaminated and, thus, faulty in operation. When this occurs, the impedance across the switch terminals may be other than the normally zero (theoretically) impedance value when the switch is closed, and the normally infinite (theoretically) impedance value when the switch is opened. As a practical matter, a switch manufacturer may specify a switch closed impedance of 50 ohms or less, and a switch opened impedance of 100K ohms or more. That is, when the switch is faulty, a finite amount of impedance (e.g., somewhere between 50 ohms and 100K ohms) may be measured across the switch terminals. This switch impedance adds in series to the resistance or impedance of the pull-up resistor, which ultimately changes the voltage present on the second terminal of the switch, perhaps regardless of whether the switch is opened or closed. If the switch is fouled or corroded, the voltage at the second terminal of the switch may assume any value between 0 VDC and +5 VDC (or whatever the value of the positive or negative voltage source). Further, if this voltage is equal to the reference voltage on the comparator, the output of the comparator may oscillate which, depending on when the comparator output voltage is read, could indicate the switch is either open or closed.
Some electronic applications require a plurality of two-position switches to have their individual status scanned or sensed by a single interface circuit. This is to reduce the total amount of circuitry. Typically a multiplexer is used where the plurality of switches are connected to the inputs of the multiplexer. One of the inputs is selected to appear at the single output line of the multiplexer, and the multiplexer output is connected to one input of a comparator in a similar manner as described hereinbefore. Essentially, this is a scanned parallel to serial discrete switch interface.
A common prior art comparator interface utilizes conventional hysteresis circuitry that varies the reference voltage on the other comparator input (i.e., the reference input) depending on the condition of the last switch read. A problem with this scheme, however, is that when a switch becomes fouled or contaminated and develops a finite impedance value, the comparator may interpret the switch to be in the wrong state. This is because the reference voltage has been set by the previous reading of an unrelated discrete switch. That is, the reference voltage has "memory". Even though this comparator interface with hysteresis may better prevent oscillation of the comparator output voltage about the reference voltage value, it is similar to the non-hysteresis embodiment described hereinbefore in that it may or may not be able to detect a fouled or dirty switch.